@import "../public/scss/functions";
@import "../public/scss/variables";
@import "../public/scss/mixins";

@import "../../node_modules/bootstrap/scss/root";
@import "../../node_modules/bootstrap/scss/reboot";

html{
  opacity: 0;
}
.adaptive-loaded{
  opacity: 1;
}

body{
  overflow: auto;
  overflow-x:hidden;
}

a{
  transition: color .15s,opacity .15s,background-color .15s;
}

a:focus,button:focus{
  outline: none;
}

address {
  margin-bottom: .16rem;
}
ol,
ul,
dl {
  margin-bottom: .16rem;
}
dd {
  margin-bottom: .08rem;
}
blockquote {
  margin: 0 0 .16rem;
}
pre {
  margin-bottom: 1.16rem;
}
figure {
  margin: 0 0 .16rem;
}
legend {
  margin-bottom: .08rem;
  @include font-size(.24rem);
}
@import "../../node_modules/bootstrap/scss/type";
@import "../../node_modules/bootstrap/scss/images";
@import "../../node_modules/bootstrap/scss/code";
@import "../../node_modules/bootstrap/scss/grid";
@import "../../node_modules/bootstrap/scss/tables";
@import "../../node_modules/bootstrap/scss/forms";
@import "../../node_modules/bootstrap/scss/buttons";
@import "../../node_modules/bootstrap/scss/transitions";
@import "../../node_modules/bootstrap/scss/dropdown";
@import "../../node_modules/bootstrap/scss/button-group";
@import "../../node_modules/bootstrap/scss/input-group";
@import "../../node_modules/bootstrap/scss/custom-forms";
@import "../../node_modules/bootstrap/scss/nav";
@import "../../node_modules/bootstrap/scss/navbar";
.navbar-toggler:focus{outline: none;}
@import "../../node_modules/bootstrap/scss/card";
@import "../../node_modules/bootstrap/scss/breadcrumb";
@import "../../node_modules/bootstrap/scss/pagination";
@import "../../node_modules/bootstrap/scss/badge";
@import "../../node_modules/bootstrap/scss/jumbotron";
@import "../../node_modules/bootstrap/scss/alert";
@import "../../node_modules/bootstrap/scss/progress";
@import "../../node_modules/bootstrap/scss/media";
@import "../../node_modules/bootstrap/scss/list-group";
@import "../../node_modules/bootstrap/scss/close";
@import "../../node_modules/bootstrap/scss/toasts";
@import "../../node_modules/bootstrap/scss/modal";
@import "../../node_modules/bootstrap/scss/tooltip";
@import "../../node_modules/bootstrap/scss/popover";
@import "../../node_modules/bootstrap/scss/carousel";
@import "../../node_modules/bootstrap/scss/spinners";
@import "../../node_modules/bootstrap/scss/utilities";
@import "../../node_modules/bootstrap/scss/print";

//等比缩放区块
.fluid-box{
  position: relative;
  overflow: hidden;
  &:before{
    content:"";
    display:block;
    // padding-bottom: (H/W*100) %;
  }
  >.fluid-box-body{
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
  }
  >.fluid-box-media{
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    -o-object-fit: cover;
    object-fit: cover;
  }
}

/* 滚动条美化 */
.scroll-bar::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.scroll-bar::-webkit-scrollbar-button {
  display: none;
}

.scroll-bar::-webkit-scrollbar-track {
  background: rgba(238,238,238,.5);
}

.scroll-bar::-webkit-scrollbar-thumb {
  background: rgba(238,238,238,.5);
  border-radius: 2px;
}
@media (max-width: 767.98px) {
  .scroll-bar::-webkit-scrollbar{
    width: 0;
    height: 0;
  }
  .scroll-bar::-webkit-scrollbar-thumb,
  .scroll-bar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0);
  }
}

/* 图片hover缩放效果 */
.hover-scale{
  .hover-scale-wrapper{
    overflow: hidden;
  }
  .hover-scale-obj{
    transition: transform .3s ease-in-out;
  }
  &:hover{
    .hover-scale-obj{
      transform: scale(1.05);
    }
  }
}

/* 文本截断 */
.text-truncate-1{
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
@for $i from 2 through 5{
  .text-truncate-#{$i}{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: $i;
    overflow : hidden;
    text-overflow: ellipsis;
  }
}

/* cook-cms对应表单错误 */
.has-error{
  .form-control{
    border-color: $danger;
  }
  .help-block,.hint-block{
    color: $danger;
  }
}

/* 暂无数据 */
.no-data{
  text-align: center;
  margin-bottom: 0.8rem;
  margin-top: 0.8rem;
  font-size: .2rem;
  h1,h2,h3,h4{
    font-weight: bold;
    font-size: .4rem;
    margin-bottom: .45rem;
  }
}

/* bootstrap v3格式分页（主要用于cook-cms） */
.pagination{
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: .8rem 0 0;
  li{
    margin: 0 .05rem;
  }
  li>span,li>a{
    display: inline-block;
    padding: .1rem .2rem;
    font-size: .18rem;
  }

  a:hover{
    text-decoration: none;
    background-color: #fff;
  }
  .active>a{
    background-color: $primary;
    color: #fff;
  }
  li>span{
    color: #666;
  }
}
@media (max-width: 767.98px) {
  .pagination{
    justify-content: space-around;
    li{
      display: none;
    }
    .prev,.next,.active{
      display: block;
    }
  }
}

/* 富文本内容默认样式 */
.rich-text{
  font-size: .14rem;
  //line-height: 1.35;
  line-height: 1.6;
  word-break: break-word;

  p{
    text-align: justify;
  }
  td,th{
    >p:last-child,
    >ul:last-child,
    >ol:last-child,
    >dl:last-child {
      margin-bottom: 0;
    }
  }

  .table td,
  .table th{
    vertical-align: inherit;
  }
}

/* 移动端视频播放layer弹框的背景 */
.play-video-icon{
  width: 1rem;
  height: 1rem;
  background-color: $danger;
  border-radius: .5rem;
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -0.5rem 0 0 -0.5rem;
  transition: transform .15s;
  cursor: pointer;
  z-index: 10;
  &:hover{
    transform: scale(1.1);
  }
  &:after{
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    transform: translate(-50%,-50%);
    margin-left: .05rem;
    vertical-align: 0.255em;
    border-left: 0.34rem solid #fff;
    border-top: 0.22rem solid transparent;
    border-right: 0;
    border-bottom: 0.22rem solid transparent;
  }
}
#layer-mobile-video{
  background-color: #000;
}

/* swiper样式重置 */
.swiper-pagination{
  display: flex;
  align-items: center;
  justify-content: center;
}
.swiper-container-horizontal>.swiper-pagination-bullets,
.swiper-pagination-custom, .swiper-pagination-fraction{
  bottom: .24rem;
}
.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{
  margin: 0 .1rem;
}
.swiper-pagination-bullet{
  width: .1rem;
  height: .1rem;
  border-radius: 50%;
  border:1px solid $primary;
  opacity: 1;
  background-color: transparent;
}
.swiper-pagination-bullet-active{
  background-color: $primary;
}
.swiper-pagination-white{
  .swiper-pagination-bullet{
    border-color: #fff;
  }
}
.swiper-button-prev,
.swiper-button-next{
  background-image: none;
  padding: 0;
  border:none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  transform: translateY(-50%);
  width: auto;
  height: auto;

  &:focus{
    outline: none;
  }
}
.swiper-button-prev{
  left: 0;
}
.swiper-button-next{
  right: 0;
}
